﻿using System;
using TrueSync;
using Network;

[System.Serializable]
public class InitState : StateBase
{
    public override StateEnum StateName { get { return StateEnum.Init; } }
    public override void Enter(LogicEntity lEntity, StateBase lastState, object[] stateParams)
    {
        base.Enter(lEntity, lastState, stateParams);
        mLEntity.GetLogicComponent<LogicMoveComponent>().MoveSpeed = TSVector2.zero;
        LogicMoveComponent moveComponent = lEntity.GetLogicComponent<LogicMoveComponent>();
        moveComponent.FaceOther();
    }

    public override void Excute(FP deltaTime)
    {
        if(IsFinished())
        {
            mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Stand);
        }
    }


    public override void OnStimulate(Stimulate stimulate)
    {
    }
}
